package com.example;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName TestController
 * @Description
 * @Author Yin
 * @Date 2021/4/11 23:37
 * @Version 1.0
 */
@RestController
public class TestController {
    @Autowired
    private UserService userService;

    @RequestMapping("/test")
    public void test(){
        UserValidator userService = (UserValidator) this.userService;
        System.out.println(userService.validate(new User("yin", 11)));
        System.out.println("test");
    }
}
